Generating texture image for virtual object from captured image

ABSTRACT

Generating a texture image of a virtual fabric from a captured image involves generating similarity information about each similarity between a basic pattern included in a target analysis area and a plurality of sub areas which divide the target analysis area. At least one of information about a repetition number of the basic pattern and information about a repetition direction of the basic pattern is generated based on the similarity information. A texture image of a virtual fabric is generated by disposing a plurality of basic patterns in a predetermined area based on the basic pattern, the information about the repetition number and the information about the repetition direction.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a bypass continuation of International PCT Patent ApplicationNo. PCT/KR2022/009747 filed on Jul. 6, 2022, which claims priority toRepublic of Korea Patent Application No. 10-2021-0088927, filed on Jul.7, 2021, and Republic of Korea Patent Application No. 10-2022-0082625,filed on Jul. 5, 2022, which are incorporated herein by reference intheir entirety for all purposes.

BACKGROUND 1. Field of the Invention

The disclosure relates to generating a texture image for a virtualobject from a captured image.

2. Description of the Related Art

A fabric manufactured by a weaving method may have a regular pattern. Ingeneral, a pattern of the fabric is extracted manually by a person, andthe texture of the fabric may be synthesized from the extracted pattern.In order to use an actual fabric in a virtual simulation, the fabric mayneed to be produced in a form of a texture. However, many repetitiveoperations are performed to generate the texture. Therefore, virtualsimulation of various actual fabrics may require a lot of time and humanresources.

The virtual fabric used for garment simulation may be composed of a part(e.g., a mesh) for expressing physical properties and a part forexpressing visual properties such as texture. A texture may be composedof a part for expressing the color of the fabric and a normal map forexpressing unevenness or roughness of its surfaces.

SUMMARY

Embodiments relate to generating a texture image of a virtual fabric.Similarity information associated with similarity between a pattern in aportion of an input image and a plurality of sub areas in the portion isgenerated. At least one of a number of times the pattern is repeated inthe portion of the input image or a direction in which of the pattern isrepeated in the portion of the input image is determined based on thesimilarity information. A texture image of a virtual fabric is generatedby repeating the pattern in at least a predetermined area of the imagebased on the pattern, the number of times the pattern is repeated, andthe direction in which the pattern is repeated.

In one or more embodiments, the portion of the input image comprises anarea selected by a user input.

In one or more embodiments, the portion of the input image has a sizethat is greater than a size of the area selected by the user input.

In one or more embodiments, correcting the texture image is correctedbased on at least one of pattern correction information, overlappingarea information and brightness correction information.

In one or more embodiments, the selected area includes the pattern.

In one or more embodiments, the input image includes at least one of acolor image or a normal image. The similarity information is determinedbased on at least one of first similarity information indicative ofsimilarity between the pattern and the plurality of sub areas in thecolor image, and second similarity information is indicative ofsimilarity between the pattern and the plurality of sub areas in thenormal image.

In one or more embodiments, the similarity information is determined asa weighted sum of the first similarity information and the secondsimilarity information.

In one or more embodiments, the information about the repetition numberincludes a number of sub areas that is similar to the pattern with adegree greater than or equal to predetermined criteria.

In one or more embodiments, the information about the repetitiondirection includes direction-related information which is determinedbased on a distributed direction of sub areas similar to the patternwith a degree greater than or equal to predetermined criteria.

In one or more embodiments, the information about the repetitiondirection includes a first direction in which sub areas similar to thepattern with a degree greater than or equal to predetermined criteriaare distributed and a second direction in which sub areas similar to thepattern with a degree greater than or equal to predetermined criteriaare distributed based on a location of the pattern.

In one or more embodiments, the texture image is generated bydetermining a location of the pattern, determining a first direction anda second direction based on the location of the pattern and theinformation about the repetition direction, determining a firstrepetition number of a plurality of sub areas distributed in the firstdirection and a second repetition number of a plurality of sub areasdistributed in the second direction based on the information about therepetition number and the information about the repetition direction;and generating the texture image by arranging the pattern repeatedlybased on the first direction, the second direction, the first repetitionnumber, and the second repetition number.

In one or more embodiments, at least one of the information about therepetition number and the information about the repetition direction isdetermined by removing noise by blurring the similarity information,extracting an area having a similarity greater than or equal to athreshold value based on a blurred version of the similarityinformation, converting similarity information of the extracted areagreater than or equal to the threshold value using a frequency domaintransform, and obtaining at least one of the information about therepetition number and the information about the repetition directionbased on the converted similarity information.

In one or more embodiments, the texture image is corrected based on thepattern correction information by applying a homography function on thetexture image so that an angle between a first direction and a seconddirection becomes perpendicular, aligning a plurality of basic patternsdisposed in the generated texture image based on the first direction andthe second direction, correcting a first reference line to a straightline so that the first reference line becomes vertical relative to thesecond direction when the first reference line following the firstdirection is curved, and correcting a second reference line to astraight line so that the second reference line becomes verticalrelative to the first direction when the second reference line followingthe second direction is curved.

In one or more embodiments, the texture image is corrected based on theoverlapping area information by dividing the texture image into aplurality of patches, rearranging the plurality of patches, determiningpresence of a discontinuous pattern area in an area where the pluralityof rearranged patches contact each other, determining an overlappingarea of the plurality of patches based on presence of the discontinuouspattern area, and overlapping the plurality of patches based on theoverlapping area.

In one or more embodiments, the plurality of patches are smoothed usinga multi-band blending scheme.

In one or more embodiments, the texture image is corrected based on thebrightness correction information by correcting a brightness of thepattern that is repeated based on the brightness correction informationto resolve inconsistency of a brightness between the plurality of basicpatterns included in the texture image.

In one or more embodiments, a simulation result of clothing athree-dimensional (3D) avatar with a 3D garment incorporating thetexture image is outputted.

In one or more embodiments, a user input related to controlling a sizeof the texture image is received. The size of the texture imageexpressed on a 3D garment is modified according to the user input forthe texture image.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects, features, and advantages of the inventionwill become apparent and more readily appreciated from the followingdescription of example embodiments, taken in conjunction with theaccompanying drawings of which:

FIG. 1 is a diagram illustrating a method of generating a texture image,according to an example embodiment;

FIG. 2 is a diagram illustrating a target analysis area, selected areaand basic pattern area, according to an example embodiment;

FIG. 3 is a diagram illustrating similarity information according to anexample embodiment;

FIG. 4 is a diagram illustrating information about a repetition numberand information about a repetition direction, according to an exampleembodiment;

FIG. 5 is a diagram illustrating a method of generating a texture image,according to an example embodiment;

FIG. 6 is a diagram illustrating a method of correcting a texture imagebased on pattern correction information, according to an exampleembodiment;

FIG. 7 is a diagram illustrating a method of correcting a texture imagebased on overlapping area information, according to an exampleembodiment;

FIG. 8 is a diagram illustrating an overlapping area according to anexample embodiment;

FIG. 9 is a diagram illustrating a method of generating a correctedtexture image by eliminating an overlapping area, according to anexample embodiment;

FIG. 10 is a diagram illustrating a method of correcting a texture imagebased on brightness correction information, according to an exampleembodiment;

FIG. 11 is a flowchart illustrating a method of generating a textureaccording to an example embodiment;

FIG. 12 is a diagram illustrating a three-dimensional garment simulationin which a texture image is reflected, according to an exampleembodiment;

FIGS. 13A and 13B are diagrams illustrating a method of outputting atleast one of an input image and a texture image to a screen, accordingto an example embodiment;

FIG. 14 is a diagram illustrating a method of adjusting a size of atexture image in a three-dimensional garment simulation, according to anexample embodiment; and

FIG. 15 is a block diagram illustrating an electronic device accordingto an example embodiment.

DETAILED DESCRIPTION

The following structural or functional descriptions are examples tomerely describe embodiments, and the scope of the example embodiments isnot limited to the descriptions provided in the present specification.

Although terms of “first” or “second” are used to explain variouscomponents, the components are not limited to the terms. These termsshould be used only to distinguish one component from another component.For example, a “first” component may be referred to as a “second”component, or similarly, and the “second” component may be referred toas the “first” component within the scope of the right according to theconcept of the present disclosure.

It should be noted that if it is described that one component is“connected”, “coupled”, or “joined” to another component, a thirdcomponent may be “connected”, “coupled”, and “joined” between the firstand second components, although the first component may be directlyconnected, coupled, or joined to the second component. On the contrary,it should be noted that if it is described that one component is“directly connected”, “directly coupled”, or “directly joined” toanother component, a third component may be absent. Expressionsdescribing a relationship between components, for example, “between”,directly between”, or “directly neighboring”, etc., should beinterpreted to be alike.

The singular forms “a”, “an”, and “the” are intended to include theplural forms as well, unless the context clearly indicates otherwise. Itshould be further understood that the terms “comprises” and/or“comprising,” when used in this specification, specify the presence ofstated features, integers, steps, operations, elements, components or acombination thereof, but do not preclude the presence or addition of oneor more of other features, integers, steps, operations, elements,components, and/or groups thereof.

Unless otherwise defined, all terms, including technical and scientificterms, used herein have the same meaning as commonly understood by oneof ordinary skill in the art to which this disclosure pertains. Terms,such as those defined in commonly used dictionaries, are to beinterpreted as having a meaning that is consistent with their meaning inthe context of the relevant art, and are not to be interpreted in anidealized or overly formal sense unless expressly so defined herein.

Hereinafter, examples will be described in detail with reference to theaccompanying drawings. In the drawings, like reference numerals are usedfor like elements.

FIG. 1 is a diagram illustrating a method of generating a texture imageaccording to an example embodiment. The present disclosure may include amethod of reflecting a visual characteristic of an actual fabric in avirtual fabric realistically and efficiently as part of the process ofconverting the actual fabric into the virtual fabric.

In order to apply a visual characteristic of an actual fabric to avirtual fabric, a precise texture image may be obtained by a specializedscanner such as VIZOO. However, it may be difficult to use such devicesin a commercial setting due to their size and cost. Also, the size ofthe actual fabric to be scanned by such specialized scanner may be large(e.g., 1 yard or more).

Embodiments relate to enabling scanning of the actual fabric using asmall device. Further, embodiments enable generation of a realisticvirtual fabric with a scanned image of actual fabric that is relativelysmall in size.

Hereinafter, a method of generating a texture image of a virtual fabricwill be described in detail.

A processor 1210 according to an example embodiment may analyze andextract a pattern which repeatedly appears in the scanned image of thefabric. The processor 1210 according to an example embodiment maysynthesize the extracted pattern to generate a texture image, andcorrect the generated texture image. The processor 1210 may therebygenerate a texture image applied with the visual characteristic of thefabric. Hereinafter, a method of generating and correcting a textureimage will be described in detail.

FIG. 1 shows an input image 110, a pattern extractor 120, determination121 of a target analysis area, obtaining 122 of similarity information,information 123 about a repetition number, information 124 about arepetition direction, a texture image 130, a texture generator 140,pattern correction information 141, overlapping area information 142,brightness correction information 143, and a corrected texture image150.

The input image 110 according to an example embodiment may be an imageincluding the fabric. The input image 110 may include a color imageand/or a normal image. A fabric may be raw material for fabricatingclothing. The input image 110 may include an image obtained from animage acquisition device. The image acquisition device may be any devicewhich can obtain an image including a fabric. The image acquisitiondevice may include devices such as a camera and a scanner but is notlimited thereto.

The pattern extractor 120 according to an example embodiment may includea module for extracting a pattern from the input image 110. In thepresent disclosure, a pattern may be a visual characteristic thatrepeats in the fabric. The processor 1210 may extract a pattern from theinput image 110 using the pattern extractor 120. The processor 1210 maygenerate the texture image 130 from the input image 110 using thepattern extractor 120.

The pattern extractor 120 according to an example embodiment maydetermine 121 a target analysis area. The target analysis area 210 isdescribed with reference to FIG. 2 , and refers to a region of the inputimage 110 that has a size that is multiple times of a selected area 230selected by a user and encompasses selected area. In one embodiment, theselected area 230 may be placed at the center of the target analysisarea 210. The processor 1210 may determine the selected area 230 in theinput image 110 based on information received from a user. Theinformation received from the user may include information related tothe area selected by the user. The user may select the area for patternextraction from the input image.

The processor 1210 may determine the selected area 230 followed bydetermining of the target analysis area 210 from the input image 110based on the selected area 230. For example, when the selected area 230is determined, the processor 1210 may determine the target analysis area210 having a size that is multiple time (e.g., 4 times) larger than theselected area. The processor 1210 may determine the basic pattern area250 from the selected area 230 and/or the target analysis area 210. Thebasic pattern area 250 refers to an area that includes a unit patternused for generating a texture image. The processor 1210 may duplicateand repeat the basic pattern area 250 to generate a texture image.

After the basic pattern area 250 is determined, the processor 1210 maycalculate the similarity information indicating similarity between thebasic pattern area 250 and at least some part of the target analysisarea 210 to analyze the degree of repetition of the basic pattern area250 in the target analysis area 210. Therefore, the processor 1210 mayanalyze the degree of repetition of the basic pattern area 250 and thedirection of such repetition in the target analysis area 210, andthereby analyze the general pattern.

The pattern extractor 120 according to an example embodiment may obtain122 similarity information 370. The similarity information 370 will bedescribed in detail with reference to FIG. 3 . The basic pattern area250 may be a part of the target analysis area 210 and/or the selectedarea 230. The processor 1210 according to an example embodiment maygenerate the similarity information 370 about each similarity betweenthe basic pattern area 250 and each of the plurality of sub areas 211,212, 213 included in the target analysis area 210. The number of subareas shown in FIG. 3 is only an example, and the present disclosure isnot limited thereto.

The processor 1210 may perform a similarity check 310 to determine thesimilarity between the basic pattern area 250 and the sub areas 211,212, and 213, and as a result, generates the similarity information 370.The processor 1210 may generate similarity information about eachsimilarity between the basic pattern area 250 and the sub areas 211,212, and 213 based on a cross-correlation coefficient method.

The input image may include at least one of a color image and a normalimage. The color image may include color information. The normal imagemay include normal vector information of each pixel included in theinput image. To generate the similarity information 370, the processor1210 may use (i) only the color image, (ii) only the normal image or(iii) both the color image and the normal image. The processor 1210 maysupplement the similarity information which is not detected in the colorimage with the similarity information detected in the normal image.

The similarity information 370 according to an example embodiment may bedetermined based on at least one of first similarity information 330about similarity between the basic pattern area and the plurality of subareas which are at least some part of the selected area of the colorimage, and second similarity information 350 about similarity betweenthe basic pattern area and the plurality of sub areas which are at leastsome part of the selected area of the normal image.

The similarity information 370 according to an example embodiment may bedetermined as a weighted sum of the first similarity information 330 andthe second similarity information 350. For example, if the color patternof the fabric included in the input image includes various colors, thesimilarity information 370 may be generated by assigning a greaterweight on the first similarity information 330 than the secondsimilarity information 350. In this case, the processor 1210 maydetermine the first similarity information 330 as the similarityinformation 370. That is, the processor 1210 may not consider the secondsimilarity information 350. As another example, if the color pattern ofthe fabric includes a small number of colors or if the differencebetween each color is not significant, the processor 1210 may generatethe similarity information 370 by assigning a greater weight on thesecond similarity information 350 than the first similarity information330. As another example, if the fabric includes various colors but doesnot include repeating patterns, the processor 1210 may generate thesimilarity information 370 by assigning a greater weight on the secondsimilarity information 350 than the first similarity information 330.

The pattern extractor 120 may obtain the information 123 about therepetition number and/or the information 124 about the repetitiondirection. The method of generating the information 123 about therepetition number and the information 124 about the repetition directionwill be described in detail with reference to FIG. 4 . The processor1210 may generate at least one of the information 123 about therepetition number of the basic pattern area and the information 124about the repetition direction of the basic pattern area based on thesimilarity information 370. The processor 1210 may performpost-processing on the generated similarity information 370 asillustrated in FIG. 3 to generate the information 123 about therepetition number and/or the information 124 about the repetitiondirection.

The processor 1210 may blur the similarity information 370 to eliminatenoise. Blurring according to an example embodiment may refer tosoftening or blurring a specific area of an image. Various blurringtechniques, including Gaussian blurring may be used for such purpose.

The processor 1210 may calculate a similarity threshold value to extractonly areas and/or points with similarity to the basic pattern area 250greater than or equal to specific criteria in the target analysis area210. A similarity threshold value according to an example embodiment maybe determined by a threshold value extraction method using a histogram.Therefore, the processor 1210 may determine an area with similaritylarger than or equal to the similarity threshold value as an areasimilar to the basic pattern area.

The processor 1210 may perform a fast Fourier transform 410 on thesimilarity information 370. The processor 1210 may generate a frequencydomain image (e.g., fast Fourier transform image 430) by performingfrequency domain transform (e.g., fast Fourier transform) on thesimilarity information 370. Fourier transformed image 430 may includelocation information of the sub areas similar to the basic pattern area250.

The processor 1210 may perform a pattern repetition direction check 450on Fourier transformed image 430. Also, the processor 1210 may perform apattern repetition number check on Fourier transformed image 430.

The processor 1210 according to an example embodiment may obtain theinformation 124 about the repetition direction. The information 124about the repetition direction may include information related to adirection determined based on the distribution direction of the subareas having a similarity with the basic pattern area 250 greater thanor equal to the predetermined criteria (e.g., similarity thresholdvalue) in the target analysis area 210.

The information 124 about the repetition direction according to anexample embodiment may include a first direction along which sub areashaving a similarity with the basic pattern area 250 greater than orequal to a predetermined criteria based on the location of the basicpattern area 250 are distributed, and a second direction along which subareas having a similarity with the basic pattern area 250 greater thanor equal to a predetermined criteria are distributed. For example, thelocation of the basic pattern area 250 may include an area and/or apoint at which a first direction 471 and a second direction 472 meet.For example, the first direction may be a horizontal direction based onthe location of the basic pattern area 250. Also, the second directionmay be a vertical direction based on the location of the basic patternarea 250. A first reference line along the first direction and a secondreference line along the second direction according to an exampleembodiment may be a straight line or a curved line according to a curveof the fabric included in the input image.

The repetition number described herein refers to the number of sub areassimilar to a basic pattern area greater than or equal to a predeterminedcriteria (e.g., a similarity threshold value) in a target analysis areaor a selected area.

The information 123 about the repetition number according to an exampleembodiment may be determined based on a first repetition number of theplurality of sub areas distributed along the first direction and asecond repetition number of the plurality of sub areas distributed alongthe second direction. For example, the first repetition number of theplurality of sub areas distributed along the first direction 471 in FIG.4 may be “10”. In this case, it may mean that “11” (“1” basic patternarea+“10” sub areas) sub areas similar to the basic pattern area 250 arerepeated in the first direction (e.g., the horizontal direction) in thetarget analysis image. As another example, the second repetition numberof the plurality of sub areas distributed along the second direction 472in FIG. 4 may be “10”. In this case, it may mean that “11” (“1” basicpattern area+“10” sub areas) sub areas similar to the basic pattern area250 are repeated in the second direction (e.g., the vertical direction)in the target analysis image. If the first repetition number is “10” andthe second repetition number is “10”, the processor 1210 may obtaininformation that total “121” (“11”×“11”) basic pattern areas arerepeated in the target analysis area 210.

The pattern extractor 120 may generate a texture image 510 (e.g., atexture image 510 of FIG. 5 ). The generation of the texture image 130according to an example embodiment will be described in detail withreference to FIG. 5 . FIG. 5 illustrates the texture image 510 thatincludes the basic pattern area 250. The processor 1210 may determinethe location of the basic pattern area 250 as well as the firstdirection 471 and the second direction 472 based on the location and theinformation 124 about the repetition direction of the basic pattern area250. The processor 1210 may calculate the first repetition number of theplurality of sub areas distributed along the first direction and thesecond repetition number of the plurality of sub areas distributed alongthe second direction 472 based on the information 123 about therepetition number and the information 124 about the repetitiondirection.

The processor 1210 may generate the texture image 510 (e.g., the textureimage 510 of FIG. 5 ) by repeatedly arranging the basic pattern areabased on the first direction 471, the second direction 472, the firstrepetition number, and the second repetition number. For example, thefirst repetition number of the sub areas distributed along the firstdirection 471 may be “7” as illustrated in FIG. 5 , and the secondrepetition number of the sub areas distributed along the seconddirection 472 may be “8” as illustrated in FIG. 5 . Therefore, total “8”(“1” basic pattern area+“7” sub areas) basic pattern areas may berepeated along the first direction. Also, total “9” (“1” basic patternarea+“8” sub areas) basic pattern areas may be repeated along the seconddirection 472. Therefore, the texture image 510 (e.g., the texture image510 of FIG. 5 ) may include an image in which total “72” basic patternareas 250 are repeatedly arranged.

The texture generator 140 according to an example embodiment may includea module for correcting the texture image 130. The texture generatoraccording to an example embodiment may generate the corrected textureimage 150 based on at least one of the pattern correction information141, the overlapping area information 142, and the brightness correctioninformation 143.

There may be an angle 530 between the first direction 471 and the seconddirection 472, according to an example embodiment. If the angle 530 isnot a right angle, a pattern misalignment may occur in the texture image510 (e.g., the texture image 510 of FIG. 5 ). For example, a patternmisalignment may occur in the process of obtaining the input image. Adistortion may occur in the fabric included in the input image accordingto the viewpoint of the image acquisition device which captures theimage of the actual fabric, but is not limited thereto. As anotherexample, pattern misalignment may occur when wrinkles exist in theactual fabric. Referring to FIG. 6 , in a case in which patternmisalignment occurs, the angle 530 between the first direction 471 andthe second direction 472 may not be a right angle. Therefore, it may benecessary to correct the pattern misalignment by correcting the angle530 between the first direction 471 and the second direction 472 to be aright angle. By correcting the pattern misalignment, inconsistent ordiscontinuous basic patterns repeating in the texture image duringpattern repetition may be resolved. Hereinafter, a method of correctingthe texture image 130 will be described in detail with reference to FIG.6 .

The processor 1210 according to an example embodiment may correct 610the texture image based on the pattern correction information. Thepattern correction information according to an example embodiment mayinclude information necessary to correct pattern misalignment. As shownin FIG. 6 , if the angle 530 between the first direction 471 and thesecond direction 472 is not a right angle, pattern misalignment mayoccur in the texture image 130. Therefore, the processor 1210 mayconvert the angle 530 between the first direction 471 and the seconddirection 472 to a right angle.

If the first reference line along the first direction 471 is a curvedline, the processor 1210 according to an example embodiment may correctthe first reference line so that it becomes vertical relative to thesecond direction. For example, if there is a curve in the fabricincluded in the input image 110, the first reference line may be acurved line. In this case, the processor 1210 may correct the curvedfirst reference line by straightening the curved first reference line.

If the second reference line along the second direction 472 is a curvedline, the processor 1210 according to an example embodiment may correctthe second reference line by straightening the curved first referenceline so that the second reference line becomes vertical relative to thefirst direction. For example, if there is a curve in the fabric includedin the input image 110, the second reference line may be a curved line.In this case, the processor 1210 may correct the curved second referenceline by straightening the curved first reference line.

The processor 1210 according to an example embodiment may correct thetexture image based on the overlapping area information 142. The methodof correcting the texture image based on the overlapping areainformation 142 will be described in detail with reference to FIG. 7 .

A discontinuous pattern may occur in an area where the plurality ofbasic pattern areas meet, as the plurality of basic pattern areas arearranged in the overlapping area information 142, according to anexample embodiment. For example, the discontinuous pattern may be aseamline. In order to eliminate such a discontinuous pattern, anoverlapping area between the adjacent basic pattern areas may bedetermined. Through this process, factors that reduce the continuity ofthe pattern may be eliminated.

The processor 1210 may divide the texture image 130 into a plurality ofpatches. For example, a patch may correspond to one basic pattern area.As another example, the patch may include a plurality of basic patternareas. When dividing the texture image 130 according to an exampleembodiment into 4 areas, a first patch 710, a second patch 730, a thirdpatch 750, and a fourth patch 770 may be generated. The texture image130 may have the same size as the target analysis area. Since the targetanalysis area 210 includes the selected area 230, the selected area maybe determined based on the location information of the selected area 230in the texture image 130. When dividing the texture image 130 into aplurality of patches, the processor 1210 may perform the dividing basedon the selected area 230. Therefore, the first patch 710 may be includedin the selected area corresponding to the first patch 710. The patch maybe included in the selected area also for the second patch 730, thethird patch 750, and the fourth patch 770.

The processor 1210 may rearrange the plurality of patches. As indicatedby texture 701 in which the patches are rearranged, the processor 1210may rearrange each patch included in the texture image 130 to a firstpatch 711, a second patch 731, a third patch 751, and a fourth patch771. Accordingly, the patches 720, 740, 760, and 780 may also berearranged to areas 721, 741, 761, and 781, as indicated by texture 701in which the patches are rearranged.

A discontinuous pattern area (e.g., a seamline) may be generated wherethe rearranged first patch 711, second patch 731, third patch 751, andfourth patch 771 overlap each other. For example, the areas between thefirst patch 711 and the second patch 731, the first patch 711 and thethird patch 751, the second patch 731 and the fourth patch 771, and thethird patch 751 and the fourth patch 771 may newly overlap throughrearrangement. The adjacent areas may be adjacent to each other when theimage 700 illustrated in FIG. 7 is arranged in a repeating manner.Therefore, in order to eliminate a discontinuous pattern (e.g., aseamline) which occurs in newly adjacent areas generated from therepetition of the image 700, overlapping areas between the first patch711 and the second patch 731, the first patch 711 and the third patch751, the second patch 731 and the fourth patch 771, and the third patch751 and the fourth patch 771 may be generated and synthesized. Theprocessor 1210 may determine whether a discontinuous pattern area existsbetween the first patch 711 and the second patch 731, the first patch711 and the third patch 751, the second patch 731 and the fourth patch771, and the third patch 751 and the fourth patch 771. If adiscontinuous pattern area is present, the processor 1210 may determinethe overlapping areas of the patches. For example, if a discontinuouspattern area is present between the first patch 711 and the third patch751, the processor 1210 may generate the second overlapping area 781. Itmay also arrange the patches so that the patches overlap as much as thesecond overlapping area 781. The same process may be performed for otheradjacent areas. For example, the processor 1210 may generate the thirdoverlapping area 782 in which the first patch 711 and the second patch731 overlap. As another example, the processor 1210 may generate thefourth overlapping area 783 in which the second patch 731 and the fourthpatch 771 overlap. As another example, the processor 1210 may generatethe first overlapping area 780 in which the third patch 751 and thefourth patch 771 overlap.

The processor 1210 may search for an overlapping area in a patch.Referring to FIG. 8 , the processor 1210 may search 830 for anoverlapping area in a patch 810. The patch 810 may include patterns.Referring to FIG. 8 , small boxes 812 included in the patch 810collectively represent a pattern. The search may be conducted, forexample, by determining whether a discontinuous pattern area existsbetween patches. The result of the search may be shown as illustrated inFIG. 8 where a black area 850 represents the overlapping area.Therefore, the processor 1210 may use the information about the searchedoverlapping area 850 to overlap the plurality of patches.

The processor 1210 may overlap the plurality of patches based on theoverlapping area. Referring to FIG. 9 , the processor 1210 may overlapthe patches based on the overlapping area 850 of each of the first patch710, the second patch 730, the third patch 750, and the fourth patch750. Another processor 1210 according to an example embodiment mayoverlap the patches based on the overlapping area 850 of each of therearranged first patch 711, second patch 731, third patch 751, andfourth patch 771. The processor 1210 may overlap a plurality of patchesusing a multi-image synthesis method. For example, the multi-imagesynthesis method may include a multi-channel image synthesis method,which creates new images from images obtained from multiple channele.The multi-image synthesis method may be obtain an image matching andsynthesis result without boundary noise in the process of synthesizingthe image obtained based on a multi-camera.

The processor 1210 according to an example embodiment may perform asmoothing operation on the overlapped patches. The processor 1210according to an example embodiment may smooth the plurality of patchesusing a multi-band blending method. The multi-band blending is a tool toblend images. The multi-band blending can make a boundary betweenmatched images natural.

The processor 1210 may correct the texture image based on the brightnesscorrection information 143. A method of correcting the texture imagebased on the brightness correction information 143 will be described indetail with reference to FIG. 10 . A first patch 1011 and a second patch1012 illustrated in FIG. 10 may have different brightness. In this case,if the brightness between the patches is different, a natural brightnesschange of the general texture image may not be expressed. To resolvethis issue, a uniform brightness may be applied to the entire textureimage. Therefore, the processor 1210 may use the brightness correctioninformation 143 to resolve the inconsistent brightness of the textureimage appearing due to duplicating of a plurality of basic pattern areas250. The brightness correction information 143 may include informationfor correcting inconsistent brightness of an area caused by lighting.For example, the brightness may be high on the upper left part but maybecome lower towards the lower right part as indicated by image 1030.Such a gradient of brightness change may be expressed as a brightnesschange direction 1010. Therefore, correction of the brightness of thepatches (or basic pattern areas) included in the texture image may beperformed.

The processor 1210 may correct the brightness of the plurality of basicpattern areas based on the brightness correction information 143 toreduce inconsistency of brightness between the plurality of basicpattern areas included in the texture image. The processor 1210 maycorrect the brightness of the basic pattern areas using a sliding windowscheme. For example, the processor 1210 may correct the brightness foreach basic pattern area while moving basic pattern areas in a brightnesscorrection direction 1020.

The processor 1210 may easily extract repetitive patterns of the fabricwith the method of generating and correcting the texture image,according to an example embodiment. The processor 1210 may also applythe fabric to the virtual simulation by generating and correcting theresult in a form of a texture composed of repetitive patterns.Therefore, the processor 1210 may visually express the textureexpressing the fabric, which is included in the input image, in thegarment simulation.

FIG. 2 illustrates the target analysis area 210, the selected area 230,and the basic pattern area 250, according to an example embodiment. Thetarget analysis area 210 may include at least part of the input image110. The selected area 230 may include an area selected by the user. Theprocessor 1210 may determine the selected area 230 in the input image110 based on information received from a user. The information receivedfrom the user may include information related to the area selected bythe user. The user according to an example embodiment may select thearea for pattern extraction from the input image. The processor 1210 maydetermine the selected area 230 and then determine the target analysisarea 210 from the input image 110 based on the selected area 230. Forexample, when the selected area 230 is determined, the processor 1210may determine the target analysis area 210 which is 4 times larger insize than the selected area. The processor 1210 according to an exampleembodiment may determine the basic pattern area 250 from the selectedarea 230 and/or the target analysis area 210. The basic pattern area 250may include a unit pattern which is used to generate a texture image.Therefore, the processor 1210 may duplicate and arrange a plurality ofthe basic pattern area 250 to generate a texture image.

FIG. 3 is a diagram illustrating similarity information according to anexample embodiment. FIG. 3 illustrates the target analysis area 210, theplurality of sub areas 211, 212, and 213, basic pattern area 250,similarity check 310, the first similarity information 330, the secondsimilarity information 350, and the similarity information 370.

The pattern extractor 120 according to an example embodiment may obtain122 similarity information 370. The similarity information 370 will bedescribed in detail with reference to FIG. 3 . The basic pattern area250 according to an example embodiment may be at least a part of thetarget analysis area 210. The basic pattern area 250 according to anexample embodiment may be at least a part of the selected area 230. Theprocessor 1210 according to an example embodiment may generate thesimilarity information 370 between the basic pattern area 250 and eachof the plurality of sub areas 211, 212, 213 included in the targetanalysis area 210. The number of sub areas shown in FIG. 3 is only anexample, and the present disclosure is not limited thereto.

The processor 1210 a may perform a similarity check 310 to determine thesimilarity between the basic pattern area 250 and the sub areas 211,212, and 213. The processor 1210 may generate the similarity information370 through the similarity check 310. The processor 1210 according to anexample embodiment may generate similarity information about similaritybetween the basic pattern area 250 and the sub areas 211, 212, and 213based on a cross-correlation coefficient method, generally used formeasuring the strength between two variables in time series. Forexample, the possible range for the correlation coefficient of the timeseries data is from −1.0 to +1.0.

The input image according to an example embodiment may include at leastone of the color image and the normal image. The color image accordingto an example embodiment may include color information of an inputimage. The normal image may include normal vector information of eachpixel included in the input image. The processor 1210 use the colorimage to generate the similarity information 370. The processor 1210according to an example embodiment may use the normal image to generatethe similarity information 370. The processor 1210 according to anexample embodiment may use the color image and the normal image togenerate the similarity information 370. The processor 1210 maysupplement the similarity information which is not detected in the colorimage with the similarity information detected in the normal image.

The similarity information 370 may be determined based on at least oneof first similarity information 330 about similarity between the basicpattern area and the plurality of sub areas which are at least some partof the selected area of the color image and second similarityinformation 350 about each similarity between the basic pattern area andthe plurality of sub areas which are at least some part of the selectedarea of the normal image.

The similarity information 370 may be determined based on a weighted sumof the first similarity information 330 and the second similarityinformation 350. For example, if the color pattern of the fabricincluded in the input image includes various colors, the similarityinformation 370 may be generated by assigning a greater weight on thefirst similarity information 330 than the second similarity information350. In this case, the processor 1210 may determine the first similarityinformation 330 as the similarity information 370. That is, theprocessor 1210 may not consider the second similarity information 350.As another example, if the color pattern of the fabric includes a smallnumber of colors or if the difference between each color is not great,the processor 1210 may generate the similarity information 370 byassigning a greater weight on the second similarity information 350 thanthe first similarity information 330. As another example, if the fabricincludes various colors but does not include repeating patterns, theprocessor 1210 may generate the similarity information 370 by puttinggreater weight on the second similarity information 350 than the firstsimilarity information 330.

FIG. 4 is a diagram illustrating information about a repetition numberand information about a repetition direction, according to an exampleembodiment. FIG. 4 illustrates the similarity information 370, fastFourier transform 410, Fourier transformed image 430, pattern repetitiondirection check 450, information about the repetition direction 470, thefirst direction 471, and the second direction 472.

The processor 1210 may generate at least one of (i) the information 123about the repetition number of the basic pattern area and (ii) theinformation 124 about the repetition direction of the basic pattern areabased on the similarity information 370. The processor 1210 may performpost-processing on the generated similarity information 370 asillustrated in FIG. 3 to generate the information 123 about therepetition number and/or the information 124 about the repetitiondirection.

The processor 1210 may blur the similarity information 370 to eliminatenoise. Blurring according to an example embodiment may refer tosoftening or blurring a specific area of an image. Various blurringtechniques, including Gaussian blurring, may be used.

The processor 1210 according to an example embodiment may calculate asimilarity threshold value to extract areas and/or points that aresimilar to the basic pattern area 250 to a degree greater than or equalto specific criteria in the target analysis area 210. The similaritythreshold value according to an example embodiment may be determined bya threshold value extraction method using a histogram. The thresholdextraction method may be a method of extracting points having a highsimilarity from a histogram and determining a threshold based on pointshaving a high similarity. Therefore, the processor 1210 may determine anarea having a similarity that is greater than or equal to the similaritythreshold value as an area similar to the basic pattern area.

The processor 1210 may perform a fast Fourier transform 410 on thesimilarity information 370. The processor 1210 may generate a fastFourier transform image 430 by performing a fast Fourier transform onthe similarity information 370. Fourier transformed image 430 accordingto an example embodiment may include location information of the subareas similar to the basic pattern area 250.

The processor 1210 may perform a pattern repetition direction check 450on Fourier transformed image 430. Also, the processor 1210 may perform apattern repetition number check on Fourier transformed image 430.

The processor 1210 according to an example embodiment may obtain theinformation 124 about the repetition direction. The information 124about the repetition direction may include information related to adirection determined based on the distribution direction of the subareas that are similar to the basic pattern area 250 to a degree greaterthan or equal to the predetermined criteria (e.g., similarity thresholdvalue) in the target analysis area 210.

The information 124 about the repetition direction according to anexample embodiment may include a first direction in which sub areaswhich have a similarity with the basic pattern area 250 greater than orequal to a predetermined criteria based on the location of the basicpattern area 250 are distributed, and a second direction in which subareas which have a similarity with the basic pattern area 250 greaterthan or equal to a predetermined criteria are distributed. For example,the location of the basic pattern area 250 may include an area and/orpoint in which a first direction 471 and a second direction 472 meet.For example, the first direction may be a horizontal direction based onthe location of the basic pattern area 250. Also, the second directionmay be a vertical direction based on the location of the basic patternarea 250. A first reference line along the first direction and a secondreference line along the second direction may be a straight line or acurved line according to a curve of the fabric included in the inputimage.

The information about the repetition number according to an exampleembodiment may include information about the number of sub areas withsimilarity to the basic pattern area 250 to a degree greater than orequal to the predetermined criteria (e.g., a similarity threshold value)in the target analysis area 210. According to an example embodiment,information 123 about the repetition number may include informationabout the number of sub areas having a similarity with the basic patternarea 250 greater than or equal to the predetermined criteria in theselected area 230.

The information 123 about the repetition number according to an exampleembodiment may be determined based on a first repetition number of theplurality of sub areas distributed along the first direction and asecond repetition number of the plurality of sub areas distributed alongthe second direction. For example, the first repetition number of theplurality of sub areas distributed along the first direction 471 in FIG.4 may be “10”. In this case, it may mean that “11” (“1” basic patternarea+“10” sub areas) sub areas similar to the basic pattern area 250 andthe basic pattern area are repeated in the first direction (e.g., thehorizontal direction) in the target analysis image. As another example,the second repetition number of the plurality of sub areas distributedalong the second direction 472 in FIG. 4 may be “10”. In this case, itmay mean that “11” (“1” basic pattern area+“10” sub areas) sub areassimilar to the basic pattern area 250 and the basic pattern area arerepeated in the second direction (e.g., the vertical direction) in thetarget analysis image. If the first repetition number is “10” and thesecond repetition number is “10”, the processor 1210 may obtaininformation that total “121” (“11”×“11”) basic pattern areas arerepeated in the target analysis area 210.

FIG. 5 is a diagram illustrating a method of generating a texture imageaccording to an example embodiment. FIG. 5 illustrates the texture image510, the basic pattern area 250, the first direction 471, the seconddirection 472, the angle 530, and a location of the basic pattern area550. FIG. 5 example may illustrate the texture image 510. The basicpattern area 250 may be included in the texture image 510. The processor1210 may determine the location of the basic pattern area 250. Theprocessor 1210 according to an example embodiment may determine thefirst direction 471 and the second direction 472 based on the locationand the information 124 about the repetition direction of the basicpattern area 250. The processor 1210 may calculate the first repetitionnumber of the plurality of sub areas distributed along the firstdirection and the second repetition number of the plurality of sub areasdistributed along the second direction 472 based on the information 123about the repetition number and the information 124 about the repetitiondirection.

The processor 1210 may generate the texture image 510 by repeatedlyarranging the basic pattern area based on the first direction 471, thesecond direction 472, the first repetition number, and the secondrepetition number. For example, the first repetition number of the subareas distributed along the first direction 471 may be “7” asillustrated in FIG. 5 , and the second repetition number of the subareas distributed along the second direction 472 may be “8” asillustrated in FIG. 5 . Therefore, total “8” (“1” basic pattern area+“7”sub areas) basic pattern areas may be repeated along the firstdirection. Also, total “9” (“1” basic pattern area+“8” sub areas) basicpattern areas may be repeated along the second direction 472. Therefore,the texture image 510 may include an image in which total “72” basicpattern areas 250 are repeatedly arranged.

An angle 530 between the first direction 471 and the second direction472 according to an example embodiment may exist. FIG. 6 is a diagramillustrating a method of correcting a texture image based on patterncorrection information according to an example embodiment. FIG. 6illustrates the correction 610 of the texture image and a correctedtexture image 630 based on the texture image 130 and the patterncorrection information.

The processor 1210 may correct 610 the texture image based on thepattern correction information. The pattern correction information mayinclude information necessary to correct pattern misalignment. As shownin FIG. 6 , if the angle 530 between the first direction 471 and thesecond direction 472 is not a right angle, pattern misalignment mayoccur in the texture image 130. Therefore, the processor 1210 mayconvert the angle 530 between the first direction 471 and the seconddirection 472 to a right angle by applying a homography function on thetexture image 130.

In one embodiment, Discrete Fourier Transform (DFT) is performed on thetexture image 130 to determine the repetition directions in the textureimage 130 in which the pattern repeats. Based on the repetitiondirections, a transformation matrix for the homography function isdetermined to convert the texture image 130 into an image 630 where therepetition directions cross at 90 degrees (i.e., right angle).

If the first reference line along the first direction 471 is a curvedline, the processor 1210 may correct the first reference line so that itbecomes vertical relative to the second direction. For example, if thereis a curve in the fabric included in the input image 110, the firstreference line may be a curved line. In this case, the processor 1210may correct the curved first reference line by straightening the curvedfirst reference line.

If the second reference line along the second direction 472 is a curvedline, the processor 1210 may correct the second reference line into astraight line so that the second reference line becomes verticalrelative to the first direction. For example, if there is a curve in thefabric included in the input image 110, the second reference line may bea curved line. In this case, the processor 1210 may correct the curvedsecond reference line by straightening the curved first reference line.

FIG. 7 is a diagram illustrating a method of correcting a texture imagebased on overlapping area information, according to an exampleembodiment. FIG. 7 illustrates the plurality of patches 710, 730, 750,770, the plurality of patches 720, 740, 760, 780 within the selectedarea, the rearranged plurality of patches 711, 731, 751, 771, theplurality of patches 721, 741, 761, 781 within the rearranged selectedarea, and the plurality of overlapping areas 780, 781, 782, and 783.

The processor 1210 may divide the texture image 130 into a plurality ofpatches. For example, a patch may correspond to one basic pattern area.As another example, the patch may include a plurality of basic patternareas. When dividing the texture image 130 according to an exampleembodiment into 4 areas, a first patch 710, a second patch 730, a thirdpatch 750, and a fourth patch 770 may be generated. The texture image130 according to an example embodiment may have the same size as thetarget analysis area. Since the target analysis area 210 includes theselected area 230, the selected area may be determined based on thelocation information of the selected area 230 in the texture image 130.When dividing the texture image 130 into a plurality of patches, theprocessor 1210 may perform the dividing based on the selected area 230.Therefore, the first patch 710 may be included in the selected areacorresponding to the first patch 710. The patch may be included in theselected area also for the second patch 730, the third patch 750, andthe fourth patch 770.

The processor 1210 may rearrange the plurality of patches. As indicatedby texture 701 in which the patches are rearranged, the processor 1210may rearrange each patch included in the texture image 130 to a firstpatch 711, a second patch 731, a third patch 751, and a fourth patch771. Accordingly, the patches 720, 740, 760, and 780 may also berearranged to areas 721, 741, 761, and 781, as indicated by texture 701in which the patches are rearranged.

A discontinuous pattern area (e.g., a seamline) may be generated wherethe rearranged first patch 711, second patch 731, third patch 751, andfourth patch 771 overlap each other. For example, the areas between thefirst patch 711 and the second patch 731, the first patch 711 and thethird patch 751, the second patch 731 and the fourth patch 771, and thethird patch 751 and the fourth patch 771 may be newly overlapped throughrearrangement. The adjacent areas may be adjacent to each other when theimage 700 illustrated in FIG. 7 is arranged in a repeating manner.Therefore, in order to eliminate a discontinuous pattern (e.g., aseamline) which occurs in newly adjacent areas generated from therepetition of the image 700, overlapping areas between the first patch711 and the second patch 731, the first patch 711 and the third patch751, the second patch 731 and the fourth patch 771, and the third patch751 and the fourth patch 771 may be generated and synthesized. Theprocessor 1210 may determine whether a discontinuous pattern area existsbetween the first patch 711 and the second patch 731, the first patch711 and the third patch 751, the second patch 731 and the fourth patch771, and the third patch 751 and the fourth patch 771. If adiscontinuous pattern area exists, the processor 1210 may determine theoverlapping areas of the patches. For example, if a discontinuouspattern area exists between the first patch 711 and the third patch 751,the processor 1210 may generate the second overlapping area 781. It mayalso arrange the patches so that the patches overlap as much as thesecond overlapping area 781. The same process may be performed for otheradjacent areas. For example, the processor 1210 may generate the thirdoverlapping area 782 in which the first patch 711 and the second patch731 overlap. As another example, the processor 1210 may generate thefourth overlapping area 783 in which the second patch 731 and the fourthpatch 771 overlap. As another example, the processor 1210 may generatethe first overlapping area 780 in which the third patch 751 and thefourth patch 771 overlap.

FIG. 8 is a diagram illustrating an overlapping area according to anexample embodiment. FIG. 8 illustrates the patch 810, the overlappingarea search 830, and the overlapping area 850. The processor 1210 maysearch for an overlapping area in a patch. Referring to FIG. 8 , theprocessor 1210 may search 830 for an overlapping area in a patch 810.The result of the search may be shown as illustrated in FIG. 8 .Therefore, the processor 1210 may use the information about the searchedoverlapping area 850 to overlap the plurality of patches.

FIG. 9 is a diagram illustrating a method of generating a correctedtexture image by eliminating an overlapping area according to an exampleembodiment. FIG. 9 illustrates the first patch 710, the second patch730, the third patch 750, the fourth patch 770, the overlapping area850, and a corrected texture image 910. The processor 1210 may overlapthe plurality of patches based on the overlapping area. Referring toFIG. 9 , the processor 1210 may overlap the patches based on theoverlapping area 850 of each of the first patch 710, the second patch730, the third patch 750, and the fourth patch 750. Another processor1210 according to an example embodiment may overlap the patches based onthe overlapping area 850 of each of the rearranged first patch 711,second patch 731, third patch 751, and fourth patch 771. The processor1210 may overlap a plurality of patches using a multi-image synthesismethod. The multi-image synthesis method may be a method of obtaining animage matching and synthesis result without boundary noise in theprocess of synthesizing the image obtained by a multi-camera setup.

The processor 1210 according to an example embodiment may perform asmoothing operation on the overlapped patches. The processor 1210according to an example embodiment may smooth the plurality of patchesusing a multi-band blending method.

FIG. 10 is a diagram illustrating a method of correcting a texture imagebased on brightness correction information according to an exampleembodiment. FIG. 10 illustrates the brightness change direction 1010,the first patch 1011, the second patch 1012, the brightness correctiondirection 1020, and the degree 1030 of brightness change. The processor1210 may correct the texture image based on the brightness correctioninformation 143. A method of correcting the texture image based on thebrightness correction information 143 will be described in detail withreference to FIG. 10 . A first patch 1011 and a second patch 1012illustrated in FIG. 10 may each have a different brightness. In thiscase, if the brightness between the patches is different, a naturalbrightness change of the general texture image may not be expressed.Therefore, a preprocessing may be performed on the entire texture imageso that the overall brightness of the texture image is uniform..Therefore, the processor 1210 may use the brightness correctioninformation 143 to resolve the inconsistent brightness of the textureimage disposed by duplicating a plurality of basic pattern areas 250.The brightness correction information 143 may include information forcorrecting inconsistent brightness of an area caused by lighting. Forexample, the brightness may be high in the upper left part but maybecome lower towards the lower right part as indicated by degree 1030 ofbrightness change. Such a gradient of brightness change may be expressedas a brightness change direction 1010. Therefore, the brightness of thepatches (or basic pattern areas) included in the texture image may becorrected.

The processor 1210 may correct the brightness of the plurality of basicpattern areas based on the brightness correction information 143 toreduce inconsistency of brightness between the plurality of basicpattern areas included in the texture image. The processor 1210 maycorrect the brightness of the basic pattern areas by a sliding windowscheme. For example, the processor 1210 may correct the brightness bybasic pattern area, by moving the sliding window which has the same sizeof the basic pattern area according to a brightness correction direction1020.

FIG. 11 is a flowchart illustrating a method of generating a texture,according to an example embodiment. An electronic device 1200 accordingto an example embodiment (e.g., the electronic device 1200 of FIG. 12 )may determine 1110 the selected area in the input image which includesthe fabric.

The electronic device 1200 may determine 1120 the target analysis areain the input image based on the selected area.

The electronic device 1200 may generate 1130 similarity informationabout a similarity between the basic pattern area which is at least apart of the target analysis area and the plurality of sub areas whichare included in the target analysis area.

The electronic device 1200 may generate 1140 at least one of theinformation about the repetition number of the basic pattern area andthe information about the repetition direction of the basic patternarea, based on the similarity information.

The electronic device 1200 may generate 1160 the texture image bydisposing the plurality of basic pattern areas in a predetermined areabased on at least one of the basic pattern area, the location of thebasic pattern area, the information about the repetition number, and theinformation about the repetition direction.

FIG. 12 is a diagram illustrating a three-dimensional garment simulationin which a texture image is applied, according to an example embodiment.FIG. 12 illustrates a 3-dimensional simulation screen 1310, a fabrictype 1320, a size 1330 of a fabric, an input image display object 1350,a texture image display object 1360, an input image and texture imagedisplay object 1370, an open object 1390, a storage object 1391, anapplication object 1392, a cancel object 1393, and an input image 1380.

The 3D simulation screen 1310 includes a 3D garment applied with thetexture image based on the input image 1380. The processor 1210 maygenerate a 3D garment based on the texture image and output the 3Dsimulation screen 1310. Therefore, when the input image or the textureimage changes, the processor 1210 may generate a 3D garmentcorresponding to the input image or the texture image and output the 3Dgarment to the 3D simulation screen 1310.

The fabric type 1320 may be an object by which the processor 1210 mayreceive the information about the fabric type received from the user.For example, the user may input the fabric type through the fabric type1320. The fabric type may include, for example, a plain, repeatingpattern, a random color pattern, and a non-fabric.

The size 1330 may be an object that shows the size of the input image orthe texture image. The input image display object 1350 may be an objectfor outputting the input image to the screen. When the processor 1210receives the selection input of the input image display object 1350, theinput image 1380 may be output to the screen.

The texture image display object 1360 may be an object for outputtingthe texture image to the screen. The texture image display object 1360will be described in detail with reference to FIG. 13A below.

The input image and texture image display object 1370 may be an objectfor outputting the input image and the texture image to the screen atthe same time. The input image and texture image display object 1370will be described in detail with reference to FIG. 13B below.

The open object 1390 may be an object for loading another input image ortexture image. The storage object 1391 may be an object for storing thecurrent input image or texture image. The application object 1392 may bean object for generating the third garment based on the input image ortexture image. The cancel object 1393 may be an object for stopping theprocess of generating the 3D garment based on the input image or thetexture image.

FIGS. 13A and 13B are diagrams illustrating a method of outputting atleast one of an input image and a texture image to a screen, accordingto an example embodiment. When receiving the selection input of thetexture image display object 1360, the processor 1210 may output thetexture image 1410 to the screen.

When receiving the selection input of the input image and texture imagedisplay object 1370, the processor 1210 may output the input image 1420and the texture image 1430 to the screen.

Through this process, the user may output at least one of the inputimage and the texture image, and confirm the simulation result in whichat least one of the input image and the texture image is applied to the3D garment.

FIG. 14 is a diagram illustrating a method of adjusting a size of atexture image in a three-dimensional garment simulation, according to anexample embodiment. FIG. 14 illustrates a partial area 1510 of the 3Dgarment, a texture image 1520, a selected area 1530, and a texture image1540 corresponding to the selected area.

The processor 1210 according to an example embodiment may generate a 3Dgarment to which at least a partial area of the texture image isapplied. The user may use only a partial area of the texture image,which is generated based on the input image, for the garment design. Inthis case, the processor 1210 may generate the 3D garment based on atleast a part of the texture image. Furthermore, the processor 1210 mayoutput the simulation result on the screen, wherein the 3D avatar iswearing the 3D garment generated based on at least a part of the textureimage in the simulation result. For example, the processor 1210 mayreceive the selected area 1530 which is a partial area of the textureimage 1520 from the user. The processor 1210 may output the textureimage 1540 corresponding to the selected area to the screen based on theselected area 1530. The processor 1210 may generate the 3D garment basedon the texture image 1540 corresponding to the selected area, and mayoutput the 3D avatar wearing the 3D garment to the screen.

The processor 1210 may adjust the size of the texture image. Theprocessor 1210 may adjust the size of the texture image expressed in the3D garment. When the size of the texture image is adjusted, the size ofthe pattern and others expressed in the 3D garment may be adjusted. Forexample, the processor 1210 may receive a selection input about thepartial area 1510 of the 3D garment. A partial area 1510 of the 3Dgarment may be a pattern (e.g., front body pattern). The processor 1210may adjust the size of the texture image with respect to the partialarea 1510 of the 3D garment. In this case, the size of the texture imagedisplayed on the partial area of the 3D garment may be adjusted. Forexample, if the user enlarges the texture image, the size of the textureimage displayed on the partial area of the 3D garment may be increased.If a pattern is included in the texture image, the pattern may becomelarger.

FIG. 15 is a block diagram illustrating an electronic device accordingto an example embodiment. FIG. 15 illustrates an electronic deviceaccording to an example embodiment. Referring to FIG. 15 , theelectronic device 1200 according to an example embodiment may include amemory 1220, the processor 1210, and a communication interface 1230. Thememory 1220, the processor 1210, and the communication interface 1230may be connected to each other via a communication bus 1240.

The memory 1220 may store a variety of information generated in theprocessing process of the processor 1210 described above. Also, thememory 1220 may store a variety of data and programs. The memory 1220may include a volatile memory or a non-volatile memory. The memory 1220may include a large-capacity storage medium such as a hard disk to storea variety of data.

The processor 1210 may be a hardware-implemented apparatus having acircuit that is physically structured to execute desired operations. Thedesired operations may include, for example, code or instructions in aprogram. The hardware-implemented apparatus may include, but is notlimited to, for example, a microprocessor, a central processing unit(CPU), graphics processing unit (GPU), a processor core, a multi-coreprocessor, a multiprocessor, an application-specific integrated circuit(ASIC), a field-programmable gate array (FPGA), and a neural processingunit (NPU).

The processor 1210 may execute a program and control the automatic stocktrading apparatus. A program code executed by the processor 1210 may bestored in the memory 1220.

The examples described herein may be implemented using a hardwarecomponent, a software component and/or a combination thereof. Aprocessing device may be implemented using one or more general-purposeor special-purpose computers, such as, for example, a processor, acontroller and an arithmetic logic unit (ALU), a digital signalprocessor (DSP), a microcomputer, an FPGA, a programmable logic unit(PLU), a microprocessor or any other device capable of responding to andexecuting instructions in a defined manner. The processing device mayrun an operating system (OS) and one or more software applications thatrun on the OS. The processing device also may access, store, manipulate,process, and create data in response to execution of the software. Forpurpose of simplicity, the description of a processing device is used assingular; however, one skilled in the art will appreciate that aprocessing device may include multiple processing elements and multipletypes of processing elements. For example, the processing device mayinclude a plurality of processors, or a single processor and a singlecontroller. In addition, different processing configurations arepossible, such as parallel processors.

The software may include a computer program, a piece of code, aninstruction, or some combination thereof, to independently or uniformlyinstruct or configure the processing device to operate as desired.Software and data may be embodied permanently or temporarily in any typeof machine, component, physical or virtual equipment, computer storagemedium or device, or in a propagated signal wave capable of providinginstructions or data to or being interpreted by the processing device.The software also may be distributed over network-coupled computersystems so that the software is stored and executed in a distributedfashion. The software and data may be stored by one or morenon-transitory computer-readable recording mediums.

The methods according to the above-described examples may be recorded innon-transitory computer-readable media including program instructions toimplement various operations of the above-described examples. The mediamay also include, alone or in combination with the program instructions,data files, data structures, and the like. The program instructionsrecorded on the media may be those specially designed and constructedfor the purposes of examples, or they may be of the kind well-known andavailable to those having skill in the computer software arts. Examplesof non-transitory computer-readable media include magnetic media such ashard disks, floppy disks, and magnetic tape; optical media such asCD-ROM discs, DVDs, and/or Blue-ray discs; magneto-optical media such asoptical discs; and hardware devices that are specially configured tostore and perform program instructions, such as read-only memory (ROM),random access memory (RAM), flash memory (e.g., USB flash drives, memorycards, memory sticks, etc.), and the like. Examples of programinstructions include both machine code, such as produced by a compiler,and files containing higher-level code that may be executed by thecomputer using an interpreter.

The above-described devices may be configured to act as one or moresoftware modules in order to perform the operations of theabove-described examples, or vice versa.

As described above, although the examples have been described withreference to the limited drawings, a person skilled in the art may applyvarious technical modifications and variations based thereon. Forexample, suitable results may be achieved if the described techniquesare performed in a different order and/or if components in a describedsystem, architecture, device, or circuit are combined in a differentmanner and/or replaced or supplemented by other components or theirequivalents.

Therefore, the scope of the disclosure is defined not by the detaileddescription, but by the claims and their equivalents, and all variationswithin the scope of the claims and their equivalents are to be construedas being included in the disclosure.

What is claimed is:
 1. A method of generating a texture image of avirtual fabric, the method comprising: generating similarity informationassociated with similarity between a pattern in a portion of an inputimage and a plurality of sub areas in the portion; determining at leastone of a number of times the pattern is repeated in the portion of theinput image or a direction in which of the pattern is repeated in theportion of the input image, based on the similarity information; andgenerating a texture image of a virtual fabric by repeating the patternin at least a predetermined area of the image based on the pattern, thenumber of times the pattern is repeated, and the direction in which thepattern is repeated.
 2. The method of claim 1, wherein the portion ofthe input image comprises an area selected by a user input.
 3. Themethod of claim 2, wherein the portion of the input image has a sizethat is greater than a size of the area selected by the user input. 4.The method of claim 1, further comprising correcting the texture imagebased on at least one of pattern correction information, overlappingarea information and brightness correction information.
 5. The method ofclaim 2, wherein the selected area comprises the pattern.
 6. The methodof claim 2, wherein the input image comprises at least one of a colorimage or a normal image, and the similarity information is determinedbased on at least one of first similarity information indicative ofsimilarity between the pattern and the plurality of sub areas in thecolor image, and second similarity information indicative of similaritybetween the pattern and the plurality of sub areas in the normal image.7. The method of claim 6, wherein the similarity information isdetermined as a weighted sum of the first similarity information and thesecond similarity information.
 8. The method of claim 1, wherein theinformation about the repetition number comprises a number of sub areasthat is similar to the pattern with a degree greater than or equal topredetermined criteria.
 9. The method of claim 1, wherein theinformation about the repetition direction comprises direction-relatedinformation which is determined based on a distributed direction of subareas similar to the pattern with a degree greater than or equal topredetermined criteria.
 10. The method of claim 1, wherein theinformation about the repetition direction comprises a first directionin which sub areas similar to the pattern with a degree greater than orequal to predetermined criteria are distributed and a second directionin which sub areas similar to the pattern with a degree greater than orequal to predetermined criteria are distributed based on a location ofthe pattern.
 11. The method of claim 1, wherein the generating of thetexture image comprises: determining a location of the pattern;determining a first direction and a second direction based on thelocation of the pattern and the information about the repetitiondirection; determining a first repetition number of a plurality of subareas distributed in the first direction and a second repetition numberof a plurality of sub areas distributed in the second direction based onthe information about the repetition number and the information aboutthe repetition direction; and generating the texture image by arrangingthe pattern repeatedly based on the first direction, the seconddirection, the first repetition number, and the second repetitionnumber.
 12. The method of claim 1, wherein determining at least one ofthe information about the repetition number and the information aboutthe repetition direction comprises: removing noise by blurring thesimilarity information; extracting an area having a similarity greaterthan or equal to a threshold value based on a blurred version of thesimilarity information; converting similarity information of theextracted area greater than or equal to the threshold value using afrequency domain transform; and obtaining at least one of theinformation about the repetition number and the information about therepetition direction based on the converted similarity information. 13.The method of claim 4, wherein the correcting of the texture image basedon the pattern correction information comprises: applying a homographyfunction on the texture image so that an angle between a first directionand a second direction becomes perpendicular; aligning a plurality ofbasic patterns disposed in the generated texture image based on thefirst direction and the second direction; correcting a first referenceline to a straight line so that the first reference line becomesvertical relative to the second direction when the first reference linefollowing the first direction is curved; and correcting a secondreference line to a straight line so that the second reference linebecomes vertical relative to the first direction when the secondreference line following the second direction is curved.
 14. The methodof claim 4, wherein the correcting of the texture image based on theoverlapping area information comprises: dividing the texture image intoa plurality of patches; rearranging the plurality of patches;determining presence of a discontinuous pattern area in an area wherethe plurality of rearranged patches contact each other; determining anoverlapping area of the plurality of patches based on presence of thediscontinuous pattern area; and overlapping the plurality of patchesbased on the overlapping area.
 15. The method of claim 14, furthercomprising smoothing the plurality of patches using a multi-bandblending scheme.
 16. The method of claim 13, wherein the correcting ofthe texture image based on the brightness correction informationcomprises correcting a brightness of the pattern that is repeated basedon the brightness correction information to resolve inconsistency of abrightness between the plurality of basic patterns included in thetexture image.
 17. The method of claim 1, further comprising outputtinga simulation result of clothing a three-dimensional (3D) avatar with a3D garment incorporating the texture image.
 18. The method of claim 1,further comprising: receiving a user input related to controlling a sizeof the texture image; and modifying the size of the texture imageexpressed on a 3D garment according to the user input for the textureimage.
 19. A non-transitory computer-readable storage medium storinginstructions that, when executed by a processor, cause the processor togenerate similarity information associated with similarity between apattern in a portion of an input image and a plurality of sub areas inthe portion; determine at least one of a number of times the pattern isrepeated in the portion of the input image or a direction in which ofthe pattern is repeated in the portion of the input image, based on thesimilarity information; and generate a texture image of a virtual fabricby repeating the pattern in at least a predetermined area of the imagebased on the pattern, the number of times the pattern is repeated, andthe direction in which the pattern is repeated.
 20. An electronic devicecomprising: a processor; and memory storing instructions thereon, theinstructions when executed by the processor cause the processor to:generate similarity information associated with similarity between apattern in a portion of an input image and a plurality of sub areas inthe portion; determine at least one of a number of times the pattern isrepeated in the portion of the input image or a direction in which ofthe pattern is repeated in the portion of the input image, based on thesimilarity information; and generate a texture image of a virtual fabricby repeating the pattern in at least a predetermined area of the imagebased on the pattern, the number of times the pattern is repeated, andthe direction in which the pattern is repeated.